import  axios from 'axios'

// 封装axios
const request = axios.create({
    baseURL: import.meta.env.VITE_API_BASEURL, //环境变量
    timeout:5000,
})


// 请求拦截
request.interceptors.request.use(config=>{

        return config
},error=>{
   
    return Promise.reject(error)
}
)

request.interceptors.response.use(response=>{
    return response
},error=>{
   
    return Promise.reject(error)
})

export default request